<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.staticfile.net/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div th:fragment="nav">
    <div style="border: 2px darkred solid;" >
        <h1 align="center"> Thymeleaf 的学生成绩简易系统</h1>
        <div style="display: flex; justify-content: space-between">
            <!--<p th:text="${session.who}"></p>-->
            <h4 class="container"><a href="/home/go2login"><samp></samp><samp class="glyphicon glyphicon-home"></samp></a></h4>
            <div  style="width: 50%;display: flex; justify-content: space-between; padding-top: 12px">
                <p style="color: brown" th:if="${session.who == null}">
                    未登录
                </p>
                <p style="color: blue" th:if="${session.who != null}">
                    <!-- private String uname;-->
                    <samp class="glyphicon glyphicon-user">  :  </samp>
                    <span  th:text="${session.who.uname}"></span>
                </p>
                <p style="color: blueviolet"
                   th:if="${session.who != null && session.who.role == 'stu'}">
                    <samp class="glyphicon glyphicon-bookmark">  :  </samp>
                     <span>学生</span>
                </p>
                <p style="color: blueviolet"
                   th:if="${session.who != null && session.who.role == 'tea'}">
                    <samp class="glyphicon glyphicon-bookmark">  :  </samp>
                     <span>教师</span>
                </p>
                <p style="color: blueviolet"
                   th:if="${session.who != null && session.who.role == 'adm'}">
                    <samp class="glyphicon glyphicon-bookmark">  :  </samp>
                    <span>教务处</span>
                </p>
                <p th:if="${session.who != null}" style="color: blue">
                    <a href="/home/logout"><span style="color: red"><samp class="glyphicon glyphicon-off"></samp></span></a>
                </p>
                <p th:if="${session.who != null}" style="width: 5vw;height: 5vw">
                    <img style="width: 100%;height: 100%"
                         th:src="'/home/showImg/'+${session.who.pic}" class="img-circle">
                </p>
            </div>

        </div>
    </div>
</div>
</body>
</html>